<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
	<link rel="stylesheet" type="text/css" href="../layui/css/layui.css"/>
	<script src="../layui/layui.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/vue.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/axios.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="../lib/jquery-3.6.0.js" type="text/javascript" charset="utf-8"></script>
	
	<style type="text/css">
		#app{
			padding: 30px 20px;
		}
	</style>
</head>
<body>
<h1>老师界面</h1>
<div id="app">
	<div class="layui-btn-container">
	  <button class="layui-btn layui-btn-primary layui-border-green" @click="getinformation()">查询个人信息</button>
	  <button class="layui-btn layui-btn-primary layui-border-blue" @click="getcurriculum()">查询任课班级</button>
	</div>

	<div id="teaccherinformation" >
		<div class="layui-bg-gray" style="padding: 30px;">
		  <div class="layui-row layui-col-space15">
		    <div class="layui-col-md6" v-show="showinformation==1">
		      <div class="layui-panel">
		        <div style="padding: 50px 30px;">
					<p><span>名字:</span><span id="name">张三</span></p>
					<p><span>性别:</span><span id="name">男</span></p>
					<p><span>年龄:</span><span id="name">19</span></p>
					<p><span>生日:</span><span id="name">1-1</span></p>
					<p><span>工资:</span><span id="name">1000</span></p>
					
					
				</div>
		      </div>   
		    </div>
		    <div class="layui-col-md6" v-show="showcurriculum==1">
		      <div class="layui-panel">
		        <div style="padding: 50px 30px;">课程</div>
		      </div>   
		    </div>
		  </div> 
		</div>
		
		
</div>


</div>
<script type="text/javascript">
	new Vue({
		el:'#app',
		data:{
			id:'',
			name:'',
			sex:'',
			age:'',
			birthday:'',
			class:'',
			showinformation:0,
			showcurriculum:0
		},
		methods:{
			
			getinformation(){
				this.showcurriculum=0,
				this.showinformation=1,
				
				// 获取学生信息
				
					 axios
					 .post('getTeacher.action'),{
						  params:{
				                // id:this.id
				            }
					 }
					 .then(res=>{
						 console.log(res.data)
						 this.id=res.data.id
						 
						 
					 })
					 
					 
				
				
			},
			getcurriculum(){
				this.showinformation=0,
				this.showcurriculum=1
			}
			
			
		}
		
	})
	
</script>
</body>
</html>